package com.niiwoo.civet.trade.dao.mapper;

import com.niiwoo.civet.trade.dao.entity.ProjectLendRecord;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProjectLendRecordMapperExt extends ProjectLendRecordMapper {

	public ProjectLendRecord queryProjectLendRecordByProjectId(@Param("projectId") Long projectId);

	public ProjectLendRecord querySuccessLendRecordByProjectId(@Param("projectId") Long projectId);

	/**
	 * 根据放款状态查询放款记录列表
	 * 
	 * @return
	 */
	public List<ProjectLendRecord> queryProjectLendRecordListByLendStatus(@Param("lendStatus") Byte lendStatus);
	
	/**
	 * 查询异常放款记录(提供给放款异常补单JOB使用,异常重试次数不超过10次)
	 * @return
	 */
	public List<ProjectLendRecord> queryLendAbnormityJobRecordList();

	/**
	 * 根据标的来源查询T-1天的放款记录
	 * @param fromSource 标的来源
	 * @return T-1天的放款记录列表
     */
	List<ProjectLendRecord> listLendRecordByFromSource(@Param("fromSource") Byte fromSource,@Param("nowDate")String nowDate,@Param("reconDate")String reconDate);
}
